package me.leon.mylibs.DB;

import com.bigkoo.pickerview.model.IPickerViewData;

import java.util.List;

/**
 * TODO<json数据源>
 *
 * @author: 小嵩
 * @date: 2017/3/16 15:36
 */

public class JsonBean  implements IPickerViewData{


    /**
     * name : 省份
     * city : [{"name":"北京市","area":["东城区","西城区","崇文区","宣武区","朝阳区"]}]
     */

    public String name;
    public List<CityBean> city;

    // 实现 IPickerViewData 接口，
    // 这个用来显示在PickerView上面的字符串，
    // PickerView会通过IPickerViewData获取getPickerViewText方法显示出来。
    @Override
    public String getPickerViewText() {
        return this.name;
    }



    public static class CityBean  implements IPickerViewData{
        /**
         * name : 城市
         * area : ["东城区","西城区","崇文区","昌平区"]
         */
        public String name;
        public List<String> area;

        @Override
        public String getPickerViewText() {
            return name;
        }
    }
}
